<%@ page import="ar.com.photo_admin.domain.Message"%>
<!doctype html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="layout" content="main">
</head>
<body>
	<div class="container">

		<div class="page-header">
			<h1>
				${msg?.subject}
			</h1>
		</div>

		<g:if test="${flash.message}">
			<div class="alert alert-success">
				<a class="close" data-dismiss="alert">×</a>
				${flash.message}
			</div>
		</g:if>

		<div class="form-horizontal">

			<div class="control-group">
				<label class="control-label" for="from"><g:message
						code="messages.from" /></label>
				<g:if test="${received}">
					<div class="formLabel controls">
						<g:link class="formLabel" controller="user" action="publicProfile"
							id="${msg?.from?.id}">
							${msg?.from}
						</g:link>
					</div>
				</g:if>
				<g:else>
					<div class="controls">
						<g:field id="to" class="input-xlarge" type="text" name="to"
							value="${msg?.from}" readonly="true" />
					</div>
				</g:else>
			</div>

			<div class="control-group">
				<label class="control-label" for="to"><g:message
						code="messages.to" /></label>
				<g:if test="${received}">
					<div class="controls">
						<g:field id="to" class="input-xlarge" type="text" name="to"
							value="${msg?.userMessage?.to}" readonly="true" />
					</div>
				</g:if>
				<g:else>
					<div class="formLabel controls">
						<g:link controller="user" action="publicProfile"
							id="${msg?.userMessage?.to?.id}">
							${msg?.userMessage?.to}
						</g:link>
					</div>
				</g:else>
			</div>

			<div class="control-group">
				<label class="control-label" for="date"><g:message
						code="messages.date" /></label>
				<div class="controls">
					<g:field id="to" class="input-xlarge" type="text" name="to"
						value="${formatDate(format:'dd/MM/yyyy',date:msg?.dateCreated)}"
						readonly="true" />
				</div>
			</div>

			<div class="control-group">
				<label class="control-label" for="message"><g:message
						code="user.message" /></label>
				<div class="controls">
					<g:textArea id="message" name="message" class="messageArea"
						rows="3" maxlength="350" value="${msg?.message}" readonly="true"></g:textArea>
				</div>
			</div>
		</div>

		<div class="btn-group">
			<g:link class="btn btn-success" action="index">
				${message(code: 'messages.back')}
			</g:link>
		</div>
	</div>

	<div class="separator"></div>
</body>
</html>